<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:include page="../../common/header.jsp"></jsp:include>
<nav class="navbar navbar-default navbar-fixed-top">
  <div class="container">
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#about">About</a></li>
        <li><a href="#contact">Contact</a></li>
      </ul>
    </div>
  </div>
</nav>
<div id="main" class="container">
	<div class="row">
		<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
			<form action="${user==null?'user/submit':'user/update' }" method="post">
				<input name="user.id" type="hidden" value="${user.id }">
				<div class="form-group">
					<label>姓名</label>
					<input name="user.name" value="${user.name }" class="form-control" placeholder="请输入姓名">
				</div>
				<div class="form-group">
					<label>年龄</label>
					<input name="user.age" value="${user.age }" class="form-control" placeholder="请输入年龄">
				</div>
				<div class="form-group">
					<label>性别</label>
					<div class="radio-inline">
						<input name="user.sex" value="1" <c:if test="${user!=null && user.sex==1}">checked="checked"</c:if>  type="radio">男
					</div>
					<div class="radio-inline">
						<input name="user.sex" value="2" <c:if test="${user!=null && user.sex==2}">checked="checked"</c:if> type="radio">女
					</div>
				</div>
				<div class="form-group">
					<label>备注</label>
					<textarea name="user.remark" placeholder="请输入备注" class="form-control">${user.remark }</textarea>
				</div>
				<div style="text-align:center">
					<button class="btn btn-primary" type="submit">提交</button>
				</div>
			</form>
		</div>
	</div>
</div>